3.37 \(\int \frac{a-b x^2}{a^2+(-1+2 a b) x^2+b^2 x^4} \, dx\)

Optimal. Leaf size=29 \[ \frac{1}{2} \log \left (a+b x^2+x\right )-\frac{1}{2} \log \left (a+b x^2-x\right ) \]

[Out]

-Log[a - x + b*x^2]/2 + Log[a + x + b*x^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0255999, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {1164, 628} \[ \frac{1}{2} \log \left (a+b x^2+x\right )-\frac{1}{2} \log \left (a+b x^2-x\right ) \]

Antiderivative was successfully verified.

[In]

Int[(a - b*x^2)/(a^2 + (-1 + 2*a*b)*x^2 + b^2*x^4),x]

[Out]

-Log[a - x + b*x^2]/2 + Log[a + x + b*x^2]/2

Rule 1164

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(-2*d)/e - b/c, 2]},
 Dist[e/(2*c*q), Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x
 - x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] &&  !GtQ[b^2
- 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{a-b x^2}{a^2+(-1+2 a b) x^2+b^2 x^4} \, dx &=-\left (\frac{1}{2} \int \frac{\frac{1}{b}+2 x}{-\frac{a}{b}-\frac{x}{b}-x^2} \, dx\right )-\frac{1}{2} \int \frac{\frac{1}{b}-2 x}{-\frac{a}{b}+\frac{x}{b}-x^2} \, dx\\ &=-\frac{1}{2} \log \left (a-x+b x^2\right )+\frac{1}{2} \log \left (a+x+b x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0177935, size = 29, normalized size = 1. \[ \frac{1}{2} \log \left (a+b x^2+x\right )-\frac{1}{2} \log \left (a+b x^2-x\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a - b*x^2)/(a^2 + (-1 + 2*a*b)*x^2 + b^2*x^4),x]

[Out]

-Log[a - x + b*x^2]/2 + Log[a + x + b*x^2]/2

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 26, normalized size = 0.9 \begin{align*} -{\frac{\ln \left ( b{x}^{2}+a-x \right ) }{2}}+{\frac{\ln \left ( b{x}^{2}+a+x \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x)

[Out]

-1/2*ln(b*x^2+a-x)+1/2*ln(b*x^2+a+x)

________________________________________________________________________________________

Maxima [A]  time = 0.962186, size = 34, normalized size = 1.17 \begin{align*} \frac{1}{2} \, \log \left (b x^{2} + a + x\right ) - \frac{1}{2} \, \log \left (b x^{2} + a - x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x, algorithm="maxima")

[Out]

1/2*log(b*x^2 + a + x) - 1/2*log(b*x^2 + a - x)

________________________________________________________________________________________

Fricas [A]  time = 1.28171, size = 66, normalized size = 2.28 \begin{align*} \frac{1}{2} \, \log \left (b x^{2} + a + x\right ) - \frac{1}{2} \, \log \left (b x^{2} + a - x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x, algorithm="fricas")

[Out]

1/2*log(b*x^2 + a + x) - 1/2*log(b*x^2 + a - x)

________________________________________________________________________________________

Sympy [A]  time = 0.50626, size = 26, normalized size = 0.9 \begin{align*} - \frac{\log{\left (\frac{a}{b} + x^{2} - \frac{x}{b} \right )}}{2} + \frac{\log{\left (\frac{a}{b} + x^{2} + \frac{x}{b} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x**2+a)/(a**2+(2*a*b-1)*x**2+b**2*x**4),x)

[Out]

-log(a/b + x**2 - x/b)/2 + log(a/b + x**2 + x/b)/2

________________________________________________________________________________________

Giac [A]  time = 1.2268, size = 34, normalized size = 1.17 \begin{align*} \frac{1}{2} \, \log \left (b x^{2} + a + x\right ) - \frac{1}{2} \, \log \left (b x^{2} + a - x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*x^2+a)/(a^2+(2*a*b-1)*x^2+b^2*x^4),x, algorithm="giac")

[Out]

1/2*log(b*x^2 + a + x) - 1/2*log(b*x^2 + a - x)